package cn.tedu.shoot;
import java.awt.image.BufferedImage;
public class Airplane extends FlyingObject implements Enemy {
	private int speed;
	public Airplane() {
		super(80,64);
		speed = 2;
	}
	public void step() {
		y+=speed;
	}
	public int getScore() {
		return 1;
	}
	int index=1;
	public BufferedImage getImage() {
		if(isLife()) {
			return Images.airplanes[0];
		}else if(isDead()) {
			BufferedImage img = Images.airplanes[index++];
			if(index==Images.airplanes.length) {
				state = REMOVE;
			}
			return img;
		}
		return null;
			
	}
}
